home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
oop_tp55.zip
/
LIST3_3.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-01-08
|
1KB
|
46 lines
unit NewTags;
interface
uses Tags, Crt;
type
PFunc = function : real;
pPFunc = ^PFunc;
NewPump = object(DOutput)
MaxPressure : real;
ScalingFactor : real;
GetPressureDemon : PFunc;
procedure Init( ATag : String12; AStatus : boolean;
MaxP, Scale : real;
PressFunction : pPFunc );
function Flow : real;
end;
implementation
procedure NewPump.Init( ATag : String12; AStatus : boolean;
MaxP, Scale : real;
PressFunction: pPFunc );
begin
Digital.Init( ATag,AStatus);
MaxPressure := maxP;
Scalingfactor := Scale;
@GetPressureDemon := PressFunction;
end;
function NewPump.Flow : real;
begin
if Status = true then
Flow := Sqrt( (MaxPressure - GetPressureDemon)/ScalingFactor )
else
Flow := 0;
end;
{ Initialization code }
begin
{ None. }
end.